$OpenBSD: patch-configure_ac,v 1.33 2017/05/27 08:40:14 ajacoutot Exp $
Index: configure.ac
--- configure.ac.orig
+++ configure.ac
@@ -134,8 +134,6 @@ case "${host_os}" in
     ;;
   openbsd*)
     SYS=openbsd
-    CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/usr/X11R6/include"
-    LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/usr/X11R6/lib/"
     ;;
   netbsd*)
     SYS=netbsd
@@ -952,35 +950,6 @@ AC_ARG_ENABLE(optimizations,
 dnl Check for various optimization flags
 AS_IF([test "${enable_optimizations}" != "no"], [
 
-  dnl -O4 and -O3 only in production builds
-  AS_IF([test "${enable_debug}" = "no"], [
-    VLC_SAVE_FLAGS
-    CFLAGS="${CFLAGS} -O4"
-    CXXFLAGS="${CXXFLAGS} -O4"
-    OBJCFLAGS="${OBJCFLAGS} -O4"
-    AC_CACHE_CHECK([if $CC accepts -O4], [ac_cv_c_o4], [
-      AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
-        ac_cv_c_o4=yes
-      ], [
-        ac_cv_c_o4=no
-      ])
-    ])
-    AS_IF([test "${ac_cv_c_o4}" = "no"], [
-      VLC_RESTORE_FLAGS
-      CFLAGS="${CFLAGS} -O3"
-      CXXFLAGS="${CXXFLAGS} -O3"
-      OBJCFLAGS="${OBJCFLAGS} -O3"
-      AC_CACHE_CHECK([if $CC accepts -O3],  [ac_cv_c_o3], [
-        AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
-          ac_cv_c_o3=yes
-        ], [
-          ac_cv_c_o3=no
-        ])
-      ])
-      AS_IF([test "${ac_cv_c_o3}" = "no"], [VLC_RESTORE_FLAGS])
-    ])
-  ])
-
   dnl Check for fast maths
   RDC_PROG_CC_FFLAGS([no-math-errno unsafe-math-optimizations no-rounding-math no-signaling-nans cx-limited-range])
   AC_LANG_PUSH(C++)
@@ -1605,7 +1574,7 @@ AS_IF([test "${enable_live555}" != "no" -a -n "${CXX}"
     ], [
       AS_IF([test "${SYS}" != "os2"], [
         LIVE555_PREFIX=${LIVE555_PREFIX-"/usr"}
-        CPPFLAGS_live555="-I${LIVE555_PREFIX}/include/liveMedia -I${LIVE555_PREFIX}/include/groupsock -I${LIVE555_PREFIX}/include/BasicUsageEnvironment -I${LIVE555_PREFIX}/include/UsageEnvironment"
+        CPPFLAGS_live555="-I${LIVE555_PREFIX}/live/liveMedia/include -I${LIVE555_PREFIX}/live/groupsock/include -I${LIVE555_PREFIX}/live/BasicUsageEnvironment/include -I${LIVE555_PREFIX}/live/UsageEnvironment/include"
       ], [
         LIVE555_PREFIX=${LIVE555_PREFIX-"/usr/lib/live"}
         CPPFLAGS_live555="-I${LIVE555_PREFIX}/liveMedia/include -I${LIVE555_PREFIX}/groupsock/include -I${LIVE555_PREFIX}/BasicUsageEnvironment/include -I${LIVE555_PREFIX}/UsageEnvironment/include"
@@ -3730,47 +3699,18 @@ AC_ARG_ENABLE(qt, [
   ])
 ])
 AS_IF([test "${enable_qt}" != "no"], [
-  PKG_CHECK_MODULES([QT], [Qt5Core >= 5.1.0 Qt5Widgets Qt5Gui], [
-      PKG_CHECK_MODULES([QTX11], [Qt5X11Extras], [
-          VLC_ADD_LIBS([qt4],[${QTX11_LIBS}])
-          VLC_ADD_CXXFLAGS([qt4],[${QTX11_CFLAGS} -DQT5_HAS_X11])
-          PKG_CHECK_MODULES([XI], [xi], [
-            VLC_ADD_LIBS([qt4], [${XI_LIBS}])
-            VLC_ADD_CXXFLAGS([qt4], [${XI_CFLAGS} -DHAVE_XI])
-          ], [
-            PKG_CHECK_EXISTS([Qt5Gui >= 5.5], [
-              AC_MSG_ERROR([${XI_PKG_ERRORS}.])
-            ], [
-              AC_MSG_WARN([${XI_PKG_ERRORS}.])
-            ])
-          ])
-      ],[
-          AC_MSG_WARN([Not building Qt Interface with X11 helpers.])
-      ])
-
-      PKG_CHECK_EXISTS([Qt5Core >= 5.5.0 Qt5Core < 5.6.0], [
-        AC_MSG_ERROR(["You cannot build VLC with Qt-5.5.0. You need to backport I78ef29975181ee22429c9bd4b11d96d9e68b7a9c"])
-      ])
-
-      QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix Qt5Core)"
-      QT_HOST_PATH="$(eval $PKG_CONFIG --variable=host_bins Qt5Core)"
-      AC_PATH_PROGS(MOC, [moc-qt5 moc], moc, ["${QT_HOST_PATH}" "${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
-      AC_PATH_PROGS(RCC, [rcc-qt5 rcc], rcc, ["${QT_HOST_PATH}" "${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
-      AC_PATH_PROGS(UIC, [uic-qt5 uic], uic, ["${QT_HOST_PATH}" "${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
-    ], [
-      PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.6.0],, [
-        AS_IF([test -n "${enable_qt}"],[
-          AC_MSG_ERROR([${QT_PKG_ERRORS}.])
-        ],[
-          AC_MSG_WARN([${QT_PKG_ERRORS}.])
-        ])
-        enable_qt="no"
-      ])
-      QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix QtCore)"
-      AC_PATH_PROGS(MOC, [moc-qt4 moc], moc, ["${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
-      AC_PATH_PROG(RCC, rcc, rcc, [${QT_PATH}/bin ${CONTRIB_DIR}/bin])
-      AC_PATH_PROGS(UIC, [uic-qt4 uic], uic, ["${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
+  PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.6.0],, [
+    AS_IF([test -n "${enable_qt}"],[
+      AC_MSG_ERROR([${QT_PKG_ERRORS}.])
+    ],[
+      AC_MSG_WARN([${QT_PKG_ERRORS}.])
     ])
+    enable_qt="no"
+  ])
+  QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix QtCore)"
+  AC_PATH_PROGS(MOC, [moc-qt4 moc], moc, ["${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
+  AC_PATH_PROG(RCC, rcc, rcc, [${QT_PATH}/bin ${CONTRIB_DIR}/bin])
+  AC_PATH_PROGS(UIC, [uic-qt4 uic], uic, ["${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
 ])
 AS_IF([test "${enable_qt}" != "no"], [
   VLC_ADD_PLUGIN([qt4])
